<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2024/3/28
  Time: 19:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>菜单</title>
    <style>
        .column{
            background-color: #e8955c;
            text-align: center;
            height: 70px;
            /*padding: 5px;*/
            width: 100%;
            font-size: 30px;
            font-weight: bold;
        }
        .color{
            background-color: black;
            width: 100%;
            height: 10px;
        }
        .container{
            display: flex;
            justify-content: space-between;
            align-items: center;
            /*padding: 5px;*/
            height: 50px;
            background-color: #d0d0d5;
            width: 100%;
        }
        .exit-button{
            color: black;
            background-color: white;
            padding: 5px 10px;
            margin-right: 10px;
            border: none;
            cursor:pointer;

        }
    </style>
</head>
<body>
    <div class="column"><p>网上书城后台管理系统</p></div>
    <div class="color"></div>  <!--黑色色块的实现-->
    <div class="container">
        <div id="currentDate"></div>
        <button class="exit-button" onclick="exit()">退出系统</button>
    </div>

    <script>
        //实时获取当前年月日信息
        function getCurrentDate(){
            var today = new Date();
            var year = today.getFullYear();
            var month = String(today.getMonth() + 1).padStart(2,'0');  //确保月份以两位数形式显示
            var day = String(today.getDate()).padStart(2,'0'); // 获取日期并确保以两位数形式显示
            var daysOfWeek = ["日", "一", "二", "三", "四", "五", "六"];
            var dayOfWeek = daysOfWeek[today.getDay()];
            document.getElementById('currentDate' ).textContent = year + '年' + month + '月' + day + '日' +'  星期' + dayOfWeek ;
        }

        //实现退出操作
        function exit(){
            alert('退出成功！');
        }
        getCurrentDate();
    </script>
</body>
</html>
